import type { App } from 'vue'

// 按需导入 NutUI 组件
import { 
  Button,
  Cell,
  CellGroup,
  Navbar,
  Card,
  Grid,
  GridItem,
  Switch,
  Radio,
  RadioGroup,
  Popup,
  Toast,
  Dialog,
  Divider
} from '@nutui/nutui-taro'

// NutUI 组件列表
const components = [
  Button,
  Cell,
  CellGroup,
  Navbar,
  Card,
  Grid,
  GridItem,
  Switch,
  Radio,
  RadioGroup,
  Popup,
  Toast,
  Dialog,
  Divider
]

// 安装 NutUI 插件
export default {
  install(app: App) {
    components.forEach(component => {
      app.use(component)
    })
  }
} 